<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位</title>
    <style>
        /* span{
            position: absolute;
            height: 100px;
            background-color:red; 

        }

        p{
            background-color:black;
        } */

        .father{
            height: 100px;
            background-color:red;
        }

    </style>
</head>
<body>
    <!-- <span>定位了</span>
    <p>我是个背景色</p> -->

    <div class="father">
        <div class="son"></div>
    </div>
</body>
</html>